const express = require('express')
const UserController = require('../router_controller/userinfo')
const router = express.Router()

// 1. 导入 @escook/express-joi
const expressJoi = require('@escook/express-joi')
// 导入 校验规则对象
const { userInfo_schema, modifyPassword_schema, updateAvater_schema } = require('../schema/userinfo')





router.get('/getinfo', UserController.getInfo)
router.post('/updateinfo', expressJoi(userInfo_schema), UserController.updateInfo)
router.post('/modifyPassword', expressJoi(modifyPassword_schema), UserController.modifyPassword)
router.post('/updateAvater', expressJoi(updateAvater_schema), UserController.updateAvater)


module.exports = router